Skip to content

feat(oas31): display file upload input when contentMediaType or contentEncoding is present#10412

Merged
glowcloud merged 2 commits intomasterfrom
file-upload-oas31-support
Apr 11, 2025
Merged

feat(oas31): display file upload input when contentMediaType or contentEncoding is present#10412
glowcloud merged 2 commits intomasterfrom
file-upload-oas31-support

Conversation

@glowcloud
Copy link
Copy Markdown
Contributor

Refs #9278

Implement layer 3 of #9278 (comment)

Comment thread src/core/plugins/oas31/oas3-extensions/fn.js
: schema.contentEncoding

return (
(contentMediaType && typeof contentMediaType === "string") ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(contentMediaType && typeof contentMediaType === "string") ||
(typeof contentMediaType === "string" && contentMediaType !== "") ||


return (
(contentMediaType && typeof contentMediaType === "string") ||
(contentEncoding && typeof contentEncoding === "string")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(contentEncoding && typeof contentEncoding === "string")
(typeof contentEncoding === "string" && contentEncoding !== "")

Copy link
Copy Markdown
Contributor

@char0n char0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add comment explaining the short-circuit mechanism + explicit non-empty string assertions.

@glowcloud glowcloud merged commit 2696730 into master Apr 11, 2025
8 checks passed
delendik-testops pushed a commit to ModiusOpenData/swagger-ui that referenced this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants